<template>
<div id="parent">
    <child01 @getMsg="printMsg">

    </child01>
    <hr>
    <child02 :msg="msg"></child02>
</div>
</template>

<script>
import Child01 from "@/components/child01.vue";
import Child02 from "@/components/child02.vue";

export default {
    data(){
      return{
          msg:'',
      }
    },
    components: {Child02, Child01},
    methods:{
        printMsg(data){
            this.msg=data
        }
    }
}
</script>

<style >
   #parent{
       width: 70vw;
       height: 5vw;
   }
</style>